package com.yungu.swift.api.route.v2.driver;

import com.alibaba.dubbo.config.annotation.Reference;
import com.yungu.swift.api.base.BaseApi;
import com.yungu.swift.assets.driver.model.vo.DriverManageInfoVo;
import com.yungu.swift.assets.driver.model.vo.DriverRemindTypeVo;
import com.yungu.swift.assets.driver.service.DriverService;
import com.yungu.swift.base.ResponseData;
import com.yungu.swift.base.model.api.ApiParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@RestController
@RequestMapping(value = "/api/v2/driver/")
@Api(value = "【司机】司机用户相关接口", tags = "司机用户相关接口")
public class DriInfoApi  extends BaseApi {

    @Reference
    private DriverService driverService;

    @RequestMapping(value = {"/token/user/getRemindType"})
    @ApiOperation(value = "获取司机听单模式", response = ResponseData.class)
    public ResponseData<DriverRemindTypeVo> getDriverRemindType(HttpServletRequest request){
        return driverService.getDriverRemindType(getUserUid(request));
    }

    @RequestMapping(value = {"/token/user/getManageInfo"})
    @ApiOperation(value = "获取司机经营城市", response = ResponseData.class)
    public ResponseData<List<DriverManageInfoVo>> getManageCity(HttpServletRequest request){
        return driverService.getManageInfo(getUserUid(request));
    }
}
